import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import login from '@/login'
import register from '@/register'
import main from '@/mainview/main'

//导入主页面组件
import auManage from '@/mainview/authorizationManage/authorizationManage'
import basicInfo from '@/mainview/personalSetting/basicInfo'
import detailedInfo from '@/mainview/personalSetting/detailedInfo'
import groupPortrait from '@/mainview/portraitAnalysis/groupPortrait'
import personalPortrait from '@/mainview/portraitAnalysis/personalPortrait'
import listShow from '@/mainview/userList/listShow'
import tagSearching from '@/mainview/userList/tagSearching'

import search from '@/components/search'
 

Vue.use(Router)

export default new Router({
  mode:'history',
  routes: [
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path:'/',
      name:'login',
      component:login
    },
    {
      path:'/register',
      name:'register',
      component:register
    },
    {
      path:'/main',
      name:'main',
      component:main,
      children:[
        {
          path:'/personalInfo/basicInfo',
          name:'基础信息',
          component:basicInfo,
          meta:{
            requireAuth: true
          }
        },
        {
          path:'/personalInfo/detailedInfo',
          name:'详细信息',
          component:detailedInfo,
          meta:{
            requireAuth: true
          }
        },
        {
          path:'/userList/listShow',
          name:'用户列表展示',
          component:listShow,
          meta:{
            requireAuth: true
          }
        },
        {
          path:'/userList/tagSearching',
          name:'标签查询',
          component:tagSearching,
          meta:{
            requireAuth: true
          }
        },
        {
          path:'/portraitShow/personalPortrait',
          name:'个人用户画像展示',
          component:personalPortrait,
          meta:{
            requireAuth: true
          }
        },
        {
          path:'/portraitShow/groupPortrait',
          name:'群体用户画像展示',
          component:groupPortrait,
          meta:{
            requireAuth: true
          }
        },
        {
          path:'/authorizationManage/auManage',
          name:'权限管理',
          component:auManage,
          meta:{
            requireAuth: true
          }
        },
        
        
      ]
    },
    {
      path:'/search',
      name:'search',
      component:search
    }
    
  ]
})
